package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzPeitaoMapper;
import com.ruoyi.system.domain.DzPeitao;
import com.ruoyi.system.service.IDzPeitaoService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 配套信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-17
 */
@Service
public class DzPeitaoServiceImpl implements IDzPeitaoService 
{
    @Autowired
    private DzPeitaoMapper dzPeitaoMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询配套信息
     * 
     * @param ptId 配套信息主键
     * @return 配套信息
     */
    @Override
    public DzPeitao selectDzPeitaoByPtId(Long ptId)
    {
        return dzPeitaoMapper.selectDzPeitaoByPtId(ptId);
    }

    /**
     * 查询配套信息列表
     * 
     * @param dzPeitao 配套信息
     * @return 配套信息
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzPeitao> selectDzPeitaoList(DzPeitao dzPeitao)
    {

        return dzPeitaoMapper.selectDzPeitaoList(dzPeitao);
    }

    @Override
    public List<DzPeitao> selectDzPeitaoListWeb(DzPeitao dzPeitao)
    {
        return dzPeitaoMapper.selectDzPeitaoList(dzPeitao);
    }

    /**
     * 新增配套信息
     * 
     * @param dzPeitao 配套信息
     * @return 结果
     */
    @Override
    public int insertDzPeitao(DzPeitao dzPeitao)
    {
        return dzPeitaoMapper.insertDzPeitao(dzPeitao);
    }

    /**
     * 修改配套信息
     * 
     * @param dzPeitao 配套信息
     * @return 结果
     */
    @Override
    public int updateDzPeitao(DzPeitao dzPeitao)
    {
        return dzPeitaoMapper.updateDzPeitao(dzPeitao);
    }

    /**
     * 批量删除配套信息
     * 
     * @param ptIds 需要删除的配套信息主键
     * @return 结果
     */
    @Override
    public int deleteDzPeitaoByPtIds(Long[] ptIds)
    {
        return dzPeitaoMapper.deleteDzPeitaoByPtIds(ptIds);
    }

    /**
     * 删除配套信息信息
     * 
     * @param ptId 配套信息主键
     * @return 结果
     */
    @Override
    public int deleteDzPeitaoByPtId(Long ptId)
    {
        return dzPeitaoMapper.deleteDzPeitaoByPtId(ptId);
    }
}
